﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using Longbow.Security.Cryptography;
using Bootstrap.Security;
using PetaPoco;
using Longbow.Web.Mvc;
using System.Threading;

namespace Bootstrap.DataAccess.Model
{
    /// <summary>
    /// 活动呼叫
    /// </summary>

    public class callnum
    {
        public string id { get; set; } //id
        public string Date { get; set; } //呼入时间
        public string vCallNum { get; set; }//最大呼入量
        public string OutDate { get; set; }//呼出时间
        public string vOutCallNum { get; set; }//最大呼出量
        



        //活动呼叫sql
        private string _sql = "	select * from callnum";
        //private static readonly object Calls = new object();
        /// <summary>
        /// 查询活动呼叫
        /// </summary>
        /// <param name=""></param>
        /// <returns></returns>
        public virtual Page<callnum> RetrievePages(PaginationOption po)
        {
            var sql = new Sql(_sql);
            sql.OrderBy($"{po.Sort} {po.Order}");

            return DbManager.Create().Page<callnum>(po.PageIndex, 20000, sql);
        }
    }
}
